﻿using System.Data;
using System.ServiceModel;
using Types.CustomTypes;

namespace Contracts.ServiceContracts.ClientCache
{
    [ServiceContract()]
    [ServiceKnownType("GetKnownTypes", typeof(Contracts.ClientTools.KnownTypeHelper))]
    public interface IClientCache
    {
        [OperationContract()]
        [FaultContract(typeof(CCustomException))]
        DataSet GetCacheItem(string key);

        [OperationContract()]
        [FaultContract(typeof(CCustomException))]
        DataSet GetCacheItemWithRefresh(string key);

        [OperationContract()]
        [FaultContract(typeof(CCustomException))]
        [System.ComponentModel.Description("Bu metod internal kullanım içindir, lütfen kodunuzdan doğrudan çağırmayın.(KaanB)")]
        void RemoveCacheItem(string key);

        [OperationContract()]
        [FaultContract(typeof(CCustomException))]
        DataSet GetDataForCache(string pCacheItemName);
    }
}
